<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        body {
            perspective: 300px;
        }

        div {
            width: 150px;
            height: 150px;
            background-color: #ff0000;
            transition: all 1s;
            margin: 50px auto;
        }

        div:hover {
            transform: rotateY(180deg);
            width: 300px;
            height: 300px;
        }
    </style>
</head>
<body>

<div></div>

</body>
</html>